import { createRouter, createWebHistory } from "vue-router";

const router = createRouter({
  history: createWebHistory('/h5score/'),
  routes: [
    {
      path: "/",
      redirect: '/auth'
    },
    {
      path: "/auth",
      component: () => import("../views/auth/index.vue"),
    },
    {
      path: "/task",
      component: () => import("../views/task/index.vue"),
    },
    {
      path: "/task/detail",
      component: () => import("../views/task/detail.vue"),
    }
  ]
});





// router.beforeEach((to, from, next) => {
//   // 设置会员ID
//   aplus_queue.push({
//     action: "aplus.setMetaInfo",
//     arguments: ["_user_id", "11111112222"]
//   }); 

//   aplus_queue.push({
//     action: "aplus.setMetaInfo",
//     arguments: ["_dev_id", "333333"]
//   });
// });
// router.afterEach((to, from) => {
//   // document.getElementById('app').scrollTop = 0
//   window.scrollTo(0, 0);
//   aplus_queue.push({
//     action: 'aplus.setMetaInfo',
//     arguments: ['_hold', 'START']
//   });
// });

export default router;